<!doctype html>
<html class="no-js">
<head>
<include file="Public:top"/>
</head>
<body>
<!--[if lte IE 9]><p class="browsehappy">升级你的浏览器吧！ <a href="http://se.360.cn/" target="_blank">升级浏览器</a>以获得更好的体验！</p><![endif]-->
</head>
<body>
<header class="am-topbar admin-header">
 <include file='Public:header'/>
</header>
<div class="am-cf admin-main"> 
<include file='Public:left'/>
<div class=" admin-content">
	
<div class="daohang">
      <ul>
        <li><a href="{:U('Admin/Index/index')}">
        <button type="button" class="am-btn am-btn-default am-radius am-btn-xs">
        首页
        </a></li> 
      </ul>
    </div>	
<div class="admin-biaogelist">
	
    <div class="listbiaoti am-cf">
      <ul class="am-icon-flag on"> 栏目名称</ul>
      
      <dl class="am-icon-home" style="float: right;"> 当前位置： <a href="{:U(Admin/Index/index)}">首页</a> > <a href="{:U(Admin/Lister/lister)}">添加新商品</a></dl>      
    </div>
	<div class="admin-biaogelist">
    <div class="listbiaoti am-cf">
      <ul class="am-icon-users"> 管理员管理</ul>    
      <dl class="am-icon-home" style="float: right;">当前位置： 首页 > <a href="#">管理员列表</a></dl>    
      <dl>
        <a  class="am-btn am-btn-danger am-round am-btn-xs am-icon-plus"  onclick="manage_add()"> 手动添加节点</a>    
      </dl>
      <!--这里打开的是新页面-->
     </div>
    <form class="am-form am-g">
          <table width="100%" class="am-table am-table-bordered am-table-radius am-table-striped">
            <thead>
              <tr class="am-success">
                <th class="table-check"><input type="checkbox" /></th>
                <th class="table-id">ID</th>
                <th class="table-title">管理页面</th>
                <th class="table-type">节点</th>
               <!--  <th class="table-author am-hide-sm-only">会员积分</th>
               <th class="table-author am-hide-sm-only">注册日期</th>
               <th class="table-date am-hide-sm-only">最近消费</th> -->
                <th width="130px" class="table-set">操作</th>
              </tr>
            </thead>
            <tbody>
            <foreach name="arr" item="v">
              <tr>
                <td><input type="checkbox" /></td>               
                <td>{$v.id}</td>
                <td><a href="#">{$v.title}</a></td>
                <td>{$v.name}</td>
              <!--  <td class="am-hide-sm-only">访问</td><td class="am-hide-sm-only">访问</td>
               <td class="am-hide-sm-only">2014年9月4日 7:28:47</td> --> 
                <td>
                  <div class="am-btn-toolbar">
                    <div class="am-btn-group am-btn-group-xs">
                      <button class="am-btn am-btn-default am-btn-xs am-text-secondary am-round"  title="修改订单"><span class="am-icon-pencil-square-o"></span></button>
                      <button class="am-btn am-btn-default am-btn-xs am-text-danger am-round" title="删除订单"><span class="am-icon-trash-o" ></span></button>
                    </div>
                  </div>
                </td>
              </tr>          
            </tbody>
            </foreach>
          </table>          
          <ul class="am-pagination am-fr">
                <li class="am-disabled"><a href="#">«</a></li>
                <li class="am-active"><a href="#">1</a></li>
                <li><a href="#">2</a></li>
                <li><a href="#">3</a></li>
                <li><a href="#">4</a></li>
                <li><a href="#">5</a></li>
                <li><a href="#">»</a></li>
              </ul>
          <hr />          
        </form>
 <div class="foods">
 <include file='Public:footer'/>
</div>
</div>
</div>
</div>
</div>
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/polyfill/rem.min.js"></script>
<script src="assets/js/polyfill/respond.min.js"></script>
<script src="assets/js/amazeui.legacy.js"></script>
<![endif]--> 
<!--[if (gte IE 9)|!(IE)]><!--> 
<script src="__PUBLIC__/Admin/js/amazeui.min.js"></script> 
<!--<![endif]-->
<div style="display:none;" id="manage_add">
     <table cellpadding="0" cellspacing="0" class="layui-table" style="width:400px" lay-skin="row">
            <tr>
                <td>管理页面:</td>
                <td><input type="text" id="title" name="title" class="layui-input" placeholder="请输入管理页面"></td>
            </tr>
            <tr>
                <td>节点:</td>
                <td><input type="text" id="name" name="name" class="layui-input" placeholder="请输入节点,如:Admin/xxx/xxx"></td>
            </tr>
      </table>
</div>
<script type="text/javascript">
 function manage_add(){
      layui.use('layer', function () {
            layer.open({          // 普通信息弹窗
                    type:1,
                    title:'添加管理员节点',
                    content:$("#manage_add"),
                    shadeClose:true,
                    area:['400px','300px'],
                    btn:['确定','取消'],
                    btn1: function (index) {
                        $.ajax({
                           type:'POST',
                           url:'check',
                           data:'title='+$('#title').val()+'&name='+$('#name').val(),
                           dataType:'json',
                           success:function(data){
                               if(data == 1){
                                 layer.msg('添加成功',{icon:6,time:500},function(){
                                     location.href = location.href;
                                 });
                                 layer.close(index);
                               }else{
                                  alert('添加失败');  
                               }
                           },
                           error:function(data){
                              console.log(data);
                           }
                        })
                    },
                    btn2: function () {
                        layer.msg('取消添加',{icon:7,time:2000})
                    }

            });
        })
  }
</script>
</body>
</html>